1. Field of the Invention
The present invention relates to a method, apparatus and computer program for embedding a barcode in a color image, and in particular, a method, apparatus and computer program for embedding a barcode, which, when the viewing distance is long, are capable of inconspicuously embedding a barcode in a color image and hardly spoils the quality of an original image, when the viewing distance is short, capable of visually recognizing the barcode and easily taking an action to read the barcode, and capable of appropriately reading the barcode by using an existing barcode reader installed in a mobile telephone.
2. Description of the Related Art
In a POS system, commodity management is carried out by utilizing a barcode such as a QR code. The barcode consists of a combination of black bar portions and white portions. Herein, the black bar portion is called a code area, and the white portion is called a background area. Also, there are cases where the code area is composed of colors other than black. Since it is difficult to understand the content of the barcodes based only on the barcodes, it is generally carried out that information showing the content of the barcodes is printed in the vicinity of the barcodes. In addition, it has been proposed that information showing the content of the barcodes is printed so as to be superimposed on the barcodes.
Patent Document 1 describes a barcode printing method for printing information transmitted to consumers in addition to the barcodes. With the barcode printing method, the information transmitted to consumers is printed by a first color with the same tone as the illumination light of the barcode reader, and the barcodes are printed by a second color tone with the different tone from the illumination light of the barcode reader.
Patent Document 2 describes a barcode recording method for recording characters, images or identification marks on the barcode. With the barcode recording method, characters, images or identification marks are recorded with a color that does not substantially influence the readability of an optical reader for reading the barcodes.
Further, in recent years, there are many cases where a two-dimensional barcode reader is installed in advance in a mobile telephone as an application. Utilizing such a mobile telephone, it becomes possible to save labor and time for inputting letters such as a URL address by reading two-dimensional barcodes printed on a magazine or a poster.
Patent Document 3 describes that two-dimensional barcodes are colored to form a pattern, a part of a photograph and an illustration is masked, and barcodes whose color is balanced are combined and disposed therein.
Patent Document 4 describes that barcodes are substituted by a single designated color predefined by functions of e-mailing and the Web, and characters, images and symbols corresponding to the functions are displayed on the barcodes.
Non-Patent Document 1 describes QR codes which facilitate conjecture of the content of two-dimensional barcodes by superimposing a logograph and a mark on the two-dimensional barcodes. Non-Patent Document 2 describes OR codes in which the code portion is substituted for an illustrated image in an error-correctable manner, whereby the design value is increased. Non-Patent Document 3 describes two-dimensional codes having a portion expressed as matrices of color blocks, by which color-coded images can be recognized.
Patent Document 1: Japanese Publication of unexamined Patent Application No. 2002-329172
Patent Document 2: Japanese Publication of Unexamined Patent Application No. H5-135234
Patent Document 3: Japanese Publication of Unexamined Patent Application No. 2005-316972
Patent Document 4: Japanese Publication of Unexamined Patent Application No. 2006-31681
Non-Patent Document 1: http://e-ginga.net/dqrc.shtml
Non-Patent Document 2: http://it-design.co.jp/
Non-Patent Document 3: http://www.colorzip.co.jp/ja/
Since it is difficult to understand the content of a barcode consisting only of code areas and background areas based only on the barcodes, the barcodes are hardly controlled. Also, since the barcode itself is a meaningless geometric pattern, there is a problem that the barcode lacks appeal.
In such a type in which information showing the content is printed in the vicinity of the barcode, there is a problem that a space for printing the information is required. For example, where a barcode is printed on a poster, it is generally necessary to take a barcode area in addition to an image area. There is a problem that, even if the barcode is embedded in an image, the barcode becomes conspicuous.
With the barcode printing (recording) methods described in Patent Documents 1 and 2, since information such as characters, images and identification marks other than the barcode is printed (recorded) by colors that does not influence reading by a barcode reader (optical reader), the area of the information other than the barcode must be separate from the code area, and it is necessary to make the colors of both different from each other. In this case, information such as the characters, images and identification marks is expressed in portions other than the code area, and such a case occurs, in which the characters, images and identification marks cannot be sufficiently expressed in a barcode having a large number of code portions as in the QR code.
With two-dimensional barcodes described in Patent Documents 3 and 4 and Non-Patent Documents 1, 2 and 3, design and complications in management of the barcode are improved. However, since the two-dimensional barcodes described in Non-Patent Documents 1 and 2 are not designed so that a color image expressed by the juxtaposed additive color mixture in the two-dimensional barcode portion become almost equal to that of an original color image, the barcode embedded in the color image becomes conspicuous.
For example, in Patent Document 4, by superimposing of a character image, a color barcode having a colored bar portion is created, and the color barcode is disposed outside the image or in the image. Where the color barcode is disposed in the image, the design is taken into consideration by embedding a barcode in a flat-colored image area having a color tone close to the colored bar portion. However, since the juxtaposed additive color mixture in a white area (background area) and bar portion of a barcode is not taken into account, the barcode area is recognized as a color different from the peripheral area when the viewing distance is long. Also, since it is not taken into consideration that the barcode is inconspicuously embedded, a barcode is embedded in a flat area with no priority embedded in the texture area.
Therefore, there is a problem that the design of a color image deteriorates. In addition, the juxtaposed additive color mixture means that colors are mixed so that juxtaposed pixels are visually recognized as the intermediate color thereof. In detail, if color a (Xa,Ya,Za) and color b (Xb,Yb,Zb) exist in a minute area of an image, and the area ratio thereof is m:(1−m), visually recognized color c (Xc,Yc,Zc) becomes Xc=Xa*m+Xb*(1−m), Yc=Ya*m+Yb*(1−m), and Zc=Za*m+Zb*(1−m). Herein, it is assumed that the colors a, b and c are expressed by the CIE-XYZ calorimetric system.
Further, the two-dimensional barcode described in Non-Patent Document 3 is a type of color barcode. There is a problem that it is difficult to embed this barcode in a color image so that it becomes inconspicuous.